package com.example.flshtarvel.service;

import com.example.flshtarvel.entity.RouteTagMap;
import com.example.flshtarvel.entity.Tag;
import com.example.flshtarvel.mapper.RouteTagMapMapper;
import com.example.flshtarvel.vo.RouteVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RouteTagMapService {
    @Autowired(required = false)
    RouteTagMapMapper routeTagMapMapper;


    public int insertRouteTagMap(String routeId,String tagId){
        return routeTagMapMapper.insertRouteTagMap(routeId,tagId);
    }

    public int deleteRouteTagMApByRouteId(String routeId){
        return routeTagMapMapper.deleteRouteTagMApByRouteId(routeId);
    }

    public List<RouteVo> selectRouteTagMapByTagId(String tagId){
        return routeTagMapMapper.selectRouteTagMapByTagId(tagId);
    }
     public List<Tag> selectRouteTagMapByRouteId(String routeId){
        return routeTagMapMapper.selectRouteTagMapByRouteId(routeId);
     }

}
